package com.atguigu.gulimall.ware.service;

import com.atguigu.gulimall.ware.entity.vo.MergeVo;
import com.atguigu.gulimall.ware.entity.vo.PurchaseDoneVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.ware.entity.PurchaseEntity;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 *
 * @author huyulu
 * @email 1085068942@qq.com
 * @date 2021-11-28 23:13:17
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 新建一张采购单
     *
     * @author 胡菜鸡
     * @date 2021/12/28 11:00
     */
    boolean savePurchase(PurchaseEntity purchase);

    /**
     * 分页查询未领取的采购单
     *
     * @author 胡菜鸡
     * @date 2021/12/28 10:42
     */
    PageUtils queryPageUnreceivePurchase(Map<String, Object> params);

    /**
     * 合并采购需求到一个采购单中
     *
     * @author 胡菜鸡
     * @date 2021/12/28 10:56
     */
    boolean mergePurchase(MergeVo mergeVo);

    /**
     * 根据采购单id批量领取采购单
     *
     * @param ids 采购单的id集合
     * @author 胡菜鸡
     * @date 2021/12/28 13:57
     */
    boolean receivedPurchase(List<Long> ids);

    /**
     * 采购人员完成采购单
     *
     * @author 胡菜鸡
     * @date 2021/12/28 16:03
     */
    boolean purchaseDone(PurchaseDoneVo purchaseDoneVo);

}

